filter_diff Function

public pure function filter_diff(dt, x, fc) result(rst)

Estimates the derivative of a signal by utilization of a second-order system as a filter.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: dt

The time step between data points.

real(kind=real64), intent(in), dimension(:) :: x

An N-element array containing the data whose derivative is to be estimated.

real(kind=real64), intent(in) :: fc

The filter cutoff frequency, in Hz.

Return Value real(kind=real64), allocatable, dimension(:,:)

An N-element array containing the filtered signal in the first column and the derivative estimate in the second.